home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Frame;
- import java.awt.Graphics;
- import java.awt.MediaTracker;
- import java.awt.Rectangle;
-
- public class ColGrph {
- public float m_magChck;
- public int m_sx;
- public int m_sy;
- private int m_firstX;
- private int m_firstY;
- private int m_newOrgX;
- private int m_newOrgY;
- private Rectangle m_zmBuf;
- private Rectangle m_panRect;
- private boolean m_didPan;
- private float m_lstMag = 1.0F;
- private float m_lstX;
- private float m_lstY;
- public float m_xOrg;
- public float m_yOrg;
- public float m_mag = 1.0F;
- public ColUrl m_curURL;
- public ColObjIntr m_curObj;
- public Graphics m_graphicsBuffer;
- public Graphics m_mainGraphic;
- public Color m_overrideColor;
- public Color m_bkGrndClr;
- public Font m_font;
- public FontMetrics m_fontMtrc;
- public Rectangle m_bounds;
- public MediaTracker m_tracker;
- public Colada m_appComp;
-
- public void panDrw(int var1, int var2) {
- int var3 = var1 - this.m_firstX;
- int var4 = var2 - this.m_firstY;
- int var5 = (int)(this.m_xOrg - (float)var3 / this.m_mag);
- int var6 = (int)(this.m_yOrg - (float)var4 / this.m_mag);
- this.m_newOrgX = var5;
- this.m_newOrgY = var6;
- this.m_didPan = true;
- }
-
- public void panOff() {
- if (this.m_didPan) {
- this.m_xOrg = (float)this.m_newOrgX;
- this.m_yOrg = (float)this.m_newOrgY;
- }
-
- ((Frame)this.m_appComp.m_comp).setCursor(3);
- }
-
- public void colZoom(float var1) {
- this.m_magChck = this.m_mag + var1;
- if (this.m_magChck >= 0.1F && this.m_magChck <= 5.0F) {
- if (var1 == 0.0F) {
- this.m_mag = 1.0F;
- this.m_magChck = 1.0F;
- this.m_xOrg = 0.0F;
- this.m_yOrg = 0.0F;
- return;
- }
-
- this.m_xOrg += (float)this.m_sx / this.m_mag - (float)this.m_sx / this.m_magChck;
- this.m_yOrg += (float)this.m_sy / this.m_mag - (float)this.m_sy / this.m_magChck;
- this.m_mag += var1;
- }
-
- }
-
- void drawAll(Graphics var1) {
- ColUrl var2 = this.m_curURL;
- ColObjIntr var3 = this.m_curObj;
- Rectangle var4 = var1.getClipRect();
- var4.x = (int)((float)var4.x / this.m_mag + this.m_xOrg);
- var4.y = (int)((float)var4.y / this.m_mag + this.m_yOrg);
- var4.width = (int)((float)var4.width / this.m_mag + this.m_xOrg);
- var4.height = (int)((float)var4.height / this.m_mag + this.m_xOrg);
- int var5 = 0;
- boolean var6 = true;
- int var7 = 0;
- char[] var8 = this.m_appComp.layerFlags.toCharArray();
- if (this.m_mag > 1.0F) {
- label63:
- while(true) {
- if (var2 == null || this.m_appComp.m_breakDrawAll) {
- while(true) {
- if (var3 == null || this.m_appComp.m_breakDrawAll) {
- break label63;
- }
-
- if (var3.getType() == 15) {
- if (var8[var7] == 'V') {
- var6 = true;
- } else {
- var6 = false;
- }
-
- ++var7;
- }
-
- if (var6) {
- var3.draw(var1);
- ++var5;
- Thread.currentThread();
- Thread.yield();
- }
-
- var3 = var3.getNext();
- }
- }
-
- var2.draw(var1);
- var2 = (ColUrl)((ColObj)var2).getNext();
- }
- } else {
- while(var2 != null && !this.m_appComp.m_breakDrawAll) {
- var2.draw(var1);
- var2 = (ColUrl)((ColObj)var2).getNext();
- }
-
- for(; var3 != null && !this.m_appComp.m_breakDrawAll; var3 = var3.getNext()) {
- if (var3.getType() == 15) {
- if (var8[var7] == 'V') {
- var6 = true;
- } else {
- var6 = false;
- }
-
- ++var7;
- }
-
- if (var6) {
- var3.draw(var1);
- ++var5;
- }
- }
- }
-
- ((Frame)this.m_appComp.m_comp).setCursor(0);
- this.m_appComp.m_breakDrawAll = false;
- System.gc();
- }
-
- ColGrph(Colada var1) {
- this.m_bkGrndClr = Color.white;
- this.m_appComp = var1;
- this.m_bounds = ((Component)var1).bounds();
- this.m_mainGraphic = ((Component)var1).getGraphics();
- this.m_graphicsBuffer = ((Component)var1).getGraphics();
- this.m_sx = this.m_bounds.width / 2;
- this.m_sy = this.m_bounds.height / 2;
- this.m_tracker = new MediaTracker(var1);
- this.m_mainGraphic.clipRect(0, 0, this.m_bounds.width, this.m_bounds.height);
- }
-
- public void finalize() {
- this.m_graphicsBuffer.dispose();
- this.m_mainGraphic.dispose();
- }
-
- public void panOn(int var1, int var2) {
- this.m_didPan = false;
- this.m_firstX = var1;
- this.m_firstY = var2;
- this.m_panRect = new Rectangle(this.m_bounds.x, this.m_bounds.y, (int)((float)this.m_bounds.width - (float)this.m_bounds.width / this.m_mag), (int)((float)this.m_bounds.height - (float)this.m_bounds.height / this.m_mag));
- ((Frame)this.m_appComp.m_comp).setCursor(13);
- }
- }
-